num1 = float(input("请输入第一个数字："))
operator = input("请输入操作符：")
num2 = float(input("请输入第二个数字："))

if operator == "+":
    result = num1 + num2
elif operator == "-":
    result = num1 - num2
elif operator == "*":
    result = num1 * num2
elif operator == "/":
    if num2 == 0:
        print("除数不能为零")
    else:
        result = num1 / num2
else:
    print("无效的操作符")
    result = None

if result is not None:
    print(f"结果是：{result}")
